import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/Home'
import Search from '@/pages/Search'
import me from '@/pages/me'
import recommend from '@/components/search/recommend'
import original from '@/components/search/original'
import square from '@/components/search/square'
import topic from '@/components/search/topic'
import login from '@/pages/login'
import cancel from "@/components/search/cancel"
import authorXQ from '@/components/comments/authorXQ'
import userXQ from '@/components/comments/userXQ'
import xiangqing from '@/components/comments/xiangqing'
import ComHeader from '@/components/comments/ComHeader'
import emotion from "@/components/search/emotion"
import soup from '@/components/search/soup'
import essay from '@/components/search/essay'
import eng from '@/components/search/eng'
import ecn from '@/components/search/ecn'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: Home
    },
    {
      path:'/search',
      meta:{index:0},
      component:Search
    },
    {
      path:'/me',
      component:me
    },
    {
      path:'/recommend',
      component:recommend,
      meta:{index:1},
    },
    {
      path:'/original',
      component:original
    },{
      path:'/square',
      component:square
    },{
      path:'/topic',
      component:topic
    },
    {
      path:'/login',
      component:login
    },
    {
      path:'/authorXQ/:authorid',
      props:true,
      meta:{index:1},
      component:authorXQ
    },
    {
      path:'/userXQ/:userid',
      props:true,
      meta:{index:1},
      component:userXQ
    },
    {
      path:'/xiangqing/:xqid',
      props:true,
      meta:{index:1},
      component:xiangqing
    },
    {
      path:'/ComHeader/:xqid',
      props:true,
      meta:{index:1},
      component:ComHeader
    },
    {
      path:'/cancel',
      meta:{index:1},
      component:cancel
    },
    {
      path:'/emotion',
      component:emotion
    },
    {
      path:'/ecn',
      component:ecn
    },
    {
      path:'/soup',
      component:soup
    },
    {
      path:'/essay',
      component:essay
    },{
      path:'/eng',
      component:eng
    }
  ]
})
